﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="ErrorSummaryReport.aspx.cs" Inherits="DasIdeen.Pages.ErrorSummaryReport" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../UserControls/DeleteRecordDetailControl.ascx" TagName="DeleteRecordDetailControl"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="margin-top: 10px">
        <h3>
            System ErrorLog Lists :</h3>
        <hr />
        <div style="margin-top: 10px">
            <uc1:DeleteRecordDetailControl ID="DeleteRecordDetailControl1" runat="server" />
        </div>
        <p>
            The following list shows, list of errors that has been generated.</p>
    </div>
    <div style="width: 960px; margin:10px auto;overflow-x:auto;border:2px outset #808080">
        <asp:GridView runat="server" ID="gvdErrorLog" AllowSorting="true" DataKeyNames="ErrorLogPrimaryID"
            AutoGenerateColumns="false" Width="960px" AllowPaging="True" CellPadding="7" PageSize="50"
            OnPageIndexChanging="gvdErrorLog_PageIndexChanging" OnRowDataBound="gvdErrorLog_DataBound">
            <HeaderStyle BackColor="#808080" Font-Bold="True" ForeColor="#F2F2F2" />
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderStyle-Width="40px" HeaderText="ID" HeaderStyle-CssClass="gridHeaderStyle">
                    <ItemTemplate>
                        <asp:LinkButton ID="lblApplicationName" runat="server" CssClass="texthover" PostBackUrl='<%# Bind("ErrorLogPrimaryID", "~/Pages/ErrorSummaryReport.aspx?Id={0}") %>' title="Click here to get full details"
                            Style="text-decoration: underline;font-size:16px;padding-left:3px;color:#3B67B2;outline:none"
                            OnClick="lblApplicationName_Click"><%# Eval("ErrorLogPrimaryID")%></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ApplicationName" HeaderText="ApplicationName" SortExpression="ApplicationName"
                    HeaderStyle-CssClass="gridHeaderStyle" />
                <asp:BoundField DataField="MethodName" HeaderText="MethodName" SortExpression="MethodName"
                    HeaderStyle-CssClass="gridHeaderStyle" />
                <asp:BoundField DataField="ErrorMessage" HeaderText="ErrorMessage" SortExpression="ErrorMessage"
                    HeaderStyle-CssClass="gridHeaderStyle" />
                <asp:BoundField DataField="StackTrace" HeaderText="StackTrace" SortExpression="StackTrace"
                    HeaderStyle-CssClass="gridHeaderStyle" />
                <asp:BoundField DataField="Sys_DateOfCreation" HeaderText="ErrorDate" SortExpression="ErrorDate"
                    DataFormatString="{0:d}" HeaderStyle-CssClass="gridHeaderStyle" />
            </Columns>
        </asp:GridView>
             <asp:Button ID="Button1" class="CSSButton" Style="width: 240px; margin: 20px 0px 5px 720px"
            runat="server" Text="Download Records In ExcelSheet" OnClick="btnDownload_Click"/>
        <asp:Label ID="lblresult" runat="server" />
        <asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
    </div>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowPopup"
        PopupControlID="pnlpopup" CancelControlID="btnRemove" BackgroundCssClass="modalBackground">
    </asp:ModalPopupExtender>
    <asp:Panel ID="pnlpopup" runat="server" Style="display: none;width:auto; max-width:965px; padding: 0px"
        CssClass="modalPopup">
        <div class="PopupHeaderStyle">
            <h2 style=" color: #FFFFFF;float:left;margin:3px 25px; text-align: center">Error Log Details</h2>
            <div style="text-align: right; font-size: 14px; font-weight: 700;padding-top:5px"><a id="btnRemove">X</a></div>
        </div>
        <table>
            <tr>
                <td valign="top" class="TDCss">
                    ErrorLogPrimaryID :
                </td>
                <td valign="top">
                    <div class="DivPopupContent">
                        <asp:Label ID="lblErrorLogPrimaryID" runat="server" Text=""></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top" class="TDCss">
                    Application Name :
                </td>
                <td valign="top">
                    <div class="DivPopupContent">
                        <asp:Label ID="lblApplicationName" runat="server" Text=""></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top" class="TDCss">
                    Method Name :
                </td>
                <td valign="top">
                    <div class="DivPopupContent">
                        <asp:Label ID="lblMethodName" runat="server" Text=""></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top" class="TDCss">
                    Error Message :
                </td>
                <td valign="top">
                    <div class="DivPopupContent">
                        <asp:Label ID="lblErrorMessage" runat="server" Text=""></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top" class="TDCss">
                    Stack Trace :
                </td>
                <td valign="top">
                    <div class="PopUpLargeContentTextBox">
                        <asp:Label ID="lblStackTrace" runat="server" Text=""></asp:Label>
                    </div>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
